Implemented the count and the count by id builders