Function to get the item count for the list.
final int Function(BuildContext context, S state)? itemCount;