There is no Java SDK at this time, but do feel free to develop one! 
Yes, you’re correct that the count endpoint would provide counts ahead of fetching data. This is also useful for scenarios where you only require timeseries of data rather than the specific data itself.