Added entry_count function.