Simplified the Repository interface + added count method for criteria.