Converts to a map for JSON serialization.
Map<String, dynamic> toMap() => { 'count': count, if (hash != null) 'hash': hash, };