Added support for nested array responses in Protocol's count method