@Override
    public long countTicketsFor(final Service service) {
        return ticketCatalog
            .findAll()
            .stream()
            .map(Unchecked.function(definition -> {
                val collection = getTicketCollectionInstanceByMetadata(definition);
                val spliterator = firestore.collection(collection)
                    .whereEqualTo("service", service.getId())
                    .get()
                    .get()
                    .spliterator();
                return StreamSupport.stream(spliterator, false);
            }))
            .mapToLong(Stream::count)
            .sum();
    }
This is {@link GoogleCloudFirestoreTicketRegistry}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-gcp-firestore-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/GoogleCloudFirestoreTicketRegistry.java