From Mongodb client, we can use db.Collection.stats() to get status of collections, such as:
+ Number of records (count)
+ Size on disk (storageSize)
Use CommandResult to finding collection stat in java check below code :
Mongo mongo = new Mongo("localhost", 27017);
DB db = mongo.getDB("data base name");
CommandResult resultSet = db.getCollection("collectionName").getStats();
System.out.println(resultSet);
System.out.println(resultSet.get("count"));
System.out.println(resultSet.get("avgObjSize"))