Added getCount() method to dao base.