# Funny client count stats!

**URL:** https://community.wowza.com/t/funny-client-count-stats/36455
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [June 19, 2014, 10:30pm UTC](https://community.wowza.com/t/funny-client-count-stats/36455 "2014-06-19T22:30:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Janez\_Makovsek](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Janez\_Makovsek](https://community.wowza.com/u/Janez_Makovsek)
#### Post date: [June 19, 2014, 10:30pm UTC](https://community.wowza.com/t/funny-client-count-stats/36455/1 "2014-06-19T22:30:54Z")

</div>

Hi!

I have the following code:

int count = (int)app.getClientCount();

And it turns out, that only RTMP viewers are counted. When looking at Adobe HDS or Apple HTTP streaming, they are not counted. How can I see connection count?

Thanks!

Atmapuri

---

<div class="post-metadata">

### Author: ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)
#### Post date: [June 20, 2014, 1:06pm UTC](https://community.wowza.com/t/funny-client-count-stats/36455/2 "2014-06-20T13:06:47Z")

</div>

Hi,

You use appInstance.getHTTPStreamerSessionCount(); for a count of all HTTP sessions.

For RTP sessions, you can use appInstance.getRTPSessionCount();

Roger.

---

<div class="post-metadata">

### Author: ![Janez\_Makovsek](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Janez\_Makovsek](https://community.wowza.com/u/Janez_Makovsek)
#### Post date: [June 20, 2014, 9:39am UTC](https://community.wowza.com/t/funny-client-count-stats/36455/3 "2014-06-20T09:39:18Z")

</div>

Is there some global : getAllConnectionCount?

---

<div class="post-metadata">

### Author: ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)
#### Post date: [June 23, 2014, 9:49am UTC](https://community.wowza.com/t/funny-client-count-stats/36455/4 "2014-06-23T09:49:22Z")

</div>

Hi,

You can use appInstance.getConnectionCounter().getCurrent(). This will return the current count for all connections combined.

Roger.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)
#### Post date: [June 28, 2014, 5:21pm UTC](https://community.wowza.com/t/funny-client-count-stats/36455/5 "2014-06-28T17:21:46Z")

</div>

hi Atampuri, in my Measure module, that allows you to log player counts per stream/application/technology level, and which you can install and use if you like that) I get player counts with this code, I can recommend this:

> Map\<String, Integer\> flashCounts = appInstance.getPlayStreamCountsByName();
> 
> Map\<String, Integer\> smoothCounts = appInstance.getHTTPStreamerSessionCountsByName(IHTTPStreamerSession.SESSIONPROTOCOL\_SMOOTHSTREAMING);
> 
> Map\<String, Integer\> cupertinoCounts = appInstance.getHTTPStreamerSessionCountsByName(IHTTPStreamerSession.SESSIONPROTOCOL\_CUPERTINOSTREAMING);
> 
> Map\<String, Integer\> sanjoseCounts = appInstance.getHTTPStreamerSessionCountsByName(IHTTPStreamerSession.SESSIONPROTOCOL\_SANJOSESTREAMING);
> 
> Map\<String, Integer\> mpegCounts = appInstance.getHTTPStreamerSessionCountsByName(IHTTPStreamerSession.SESSIONPROTOCOL\_MPEGDASHSTREAMING);
> 
> Map\<String, Integer\> rtspCounts = appInstance.getRTPSessionCountsByName();

When working with Wowza API, I found that the most promising general methods usually only apply to RTMP clients. It feels like the first versions of Wowza only had them and they did not change the api when new streaming types were added.
