public int size() {
        // plus one deserialized head record for timestamp tracking
        return fifoQueue.size() + (headRecord == null ? 0 : 1);
    }
Returns the number of records in the queue

@return the number of records
streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordQueue.java