Structured Data Integer Properties: Counts, Capacity, and Quantity
How Schema.org Integer properties express counts, limits, and quantities in JSON-LD, and how Google expects them on Q&A pages.
This page summarises Schema.org documentation on the Integer data type and the count-, capacity-, and quantity-related properties whose values are integers. Where markup is used for question pages, Google’s Q&A (QAPage) structured data adds stricter rules for answerCount and vote counts than the generic property definitions alone.
Integer type: what “count” means in structured data
Section titled “Integer type: what “count” means in structured data”Integer in Schema.org is a number type restricted to whole numbers (no fractional part). It sits under Number in the type hierarchy and is the expected value type for dozens of properties that record how many items, people, replies, or units apply to a thing.
Data type: Integer.
— Schema.org, Integer
In JSON-LD you typically express these as bare numbers (for example "answerCount": 15), not as strings. Properties that need a unit of measure, rounding rules, or a bed type often pair with QuantitativeValue elsewhere in Schema.org; the properties covered here are the ones Schema.org documents as taking a plain Integer on the Integer property list.
Interaction and engagement counts (Q&A, comments, votes, ratings)
Section titled “Interaction and engagement counts (Q&A, comments, votes, ratings)”answerCount and commentCount on questions and creative works
Section titled “answerCount and commentCount on questions and creative works”answerCount is the number of answers a question has received. On CreativeWork more broadly, commentCount is the number of comments on that work (articles, questions, answers, and similar).
The number of answers this question has received.
— Schema.org, answerCount
The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere.
— Schema.org, commentCount
For Q&A (QAPage) structured data, Google treats these integers as totals on the live site, not only what appears in the current HTML chunk:
The total number of answers to the question. For example, if there are 15 answers, but only the first 10 are marked up due to pagination, this value would be 15. This may also be 0 for questions with no answers. answerCount + commentCount should equal the total number of replies of any type.
— Google, Q&A (
QAPage) structured data
So if answers are paginated, answerCount still reflects all answers; empty threads use 0. Any separate comment-style replies should be reflected so that answerCount + commentCount matches the full reply count Google describes.
upvoteCount and downvoteCount
Section titled “upvoteCount and downvoteCount”Schema.org separates upvotes and downvotes on community content:
The number of upvotes this question, answer or comment has received from the community.
— Schema.org, upvoteCount
The number of downvotes this question, answer or comment has received from the community.
— Schema.org, downvoteCount
Google’s Q&A documentation instead specifies a single aggregate for upvoteCount when both upvotes and downvotes exist (for questions and answers):
If the page supports upvotes and downvotes, then set the upvoteCount value to a single aggregate value that represents both upvotes and downvotes. For example, if there are 5 upvotes and 2 downvotes, the aggregate value used for upvoteCount is 3.
— Google, Q&A (
QAPage) structured data
Common conclusion: follow Schema.org’s separate upvoteCount / downvoteCount model unless you are implementing Google’s Q&A feature, in which case upvoteCount on questions and answers should be the net vote total when downvotes are supported, and the raw upvote total when they are not.
ratingCount and reviewCount
Section titled “ratingCount and reviewCount”On AggregateRating, ratingCount and reviewCount distinguish how many ratings vs written reviews exist:
The count of total number of ratings.
— Schema.org, ratingCount
The count of total number of reviews.
— Schema.org, reviewCount
These should match what the page actually shows (or the full backend total if the UI summarises a larger set), similar in spirit to answerCount pagination rules.
Lists, collections, and catalogue size
Section titled “Lists, collections, and catalogue size”numberOfItems on ItemList
Section titled “numberOfItems on ItemList”numberOfItems is the size of an ItemList, including items not rendered on the current page:
The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list.
— Schema.org, numberOfItems
Related properties include collectionSize on Collection (collectionSize) and numTracks on MusicPlaylist (numTracks). The same rule applies: use the full list size, not the length of the markup snippet.
offerCount and inventoryLevel
Section titled “offerCount and inventoryLevel”For products and offers:
The number of offers for the product.
— Schema.org, offerCount
The current approximate inventory level for the item or items.
— Schema.org, inventoryLevel
offerCount belongs on AggregateOffer when multiple offers are grouped. inventoryLevel is explicitly approximate—suitable for stock hints, not a substitute for real-time fulfilment APIs.
Event and venue capacity (maximum vs remaining)
Section titled “Event and venue capacity (maximum vs remaining)”Event markup uses integers for caps and availability:
| Property | Typical parent | Meaning |
|---|---|---|
maximumAttendeeCapacity |
Event, Place |
Total individuals who may attend |
maximumPhysicalAttendeeCapacity |
Event |
Cap for offline attendance mode |
maximumVirtualAttendeeCapacity |
Event |
Cap for online attendance mode |
remainingAttendeeCapacity |
Event |
Unallocated places left |
Schema.org defines maximumAttendeeCapacity as:
The total number of individuals that may attend an event or venue.
— Schema.org, maximumAttendeeCapacity
Physical and virtual caps apply when eventAttendanceMode is offline, online, or mixed (maximumPhysicalAttendeeCapacity, maximumVirtualAttendeeCapacity). remainingAttendeeCapacity should stay consistent with ticket sales logic: if it hits 0, the event should not still advertise open registration unless your page explains a waitlist elsewhere.
repeatCount on Schedule (repeatCount) is the integer number of times a recurring event occurs—distinct from repeatFrequency, which is a duration-based schedule (repeatFrequency).
Accommodation, reservations, and real-estate counts
Section titled “Accommodation, reservations, and real-estate counts”Lodging and floor plans use several integers that are easy to confuse:
numberOfBedrooms,numberOfRooms,numberOfBeds,occupancy— room and guest limits (numberOfBedrooms, numberOfRooms, numberOfBeds, occupancy).numberOfBathroomsTotal,numberOfFullBathrooms,numberOfPartialBathrooms— RESO-aligned bathroom math.
numberOfBathroomsTotal must follow the RESO-style sum Schema.org quotes:
The simple sum of the number of bathrooms. For example for a property with two Full Bathrooms and one Half Bathroom, the Bathrooms Total Integer will be 3.
— Schema.org, numberOfBathroomsTotal
numberOfAccommodationUnits vs numberOfAvailableAccommodationUnits distinguish total units in a complex or floor plan from those currently available (numberOfAccommodationUnits, numberOfAvailableAccommodationUnits).
Reservations use numAdults, numChildren, and partySize (numAdults, numChildren, partySize) for how many people stay or dine. additionalNumberOfGuests on RSVP flows counts extra guests beyond the invitee (additionalNumberOfGuests).
Commerce, orders, and billing quantities
Section titled “Commerce, orders, and billing quantities”| Property | Role |
|---|---|
orderQuantity |
Items ordered; default assumption 1 if omitted |
amountOfThisGood |
Quantity of goods in an offer |
requiredQuantity |
Quantity required for a how-to item |
billingIncrement |
Minimal billing quantity and rounding step (unit via unitCode) |
Schema.org states for orderQuantity:
The number of the item ordered. If the property is not set, assume the quantity is one.
— Schema.org, orderQuantity
billingIncrement is not a line-item count but the granularity charged (billingIncrement); pair it with the documented unit properties rather than stuffing units into the integer.
Jobs, education, media, and miscellany
Section titled “Jobs, education, media, and miscellany”Examples from the Integer inventory that often appear in vertical markup:
- Jobs:
totalJobOpenings— “Use a positive integer. Do not use if the number of positions is unclear or not known.” - Education:
numberOfCredits,maximumEnrollment,typicalCreditsPerTerm,termsPerYear. - Series and books:
numberOfEpisodes,numberOfSeasons,numberOfPages. - Creative works:
wordCountfor article length. - Vehicles:
vehicleSeatingCapacity,numberOfDoors— often with unit code C62 where Schema.org notes it.
itemPopularity (itemPopularity) is documented for marketplace rank, not a raw sales integer—Schema.org positions it for platform-level comparative rankings rather than self-asserted promotion.
totalJobOpenings, monthsOfExperience, and similar terms in Schema.org’s “new” area may evolve; check the canonical property page before relying on them in production.
Common mistakes
Section titled “Common mistakes”- Page-local counts on paginated lists — Using the number of visible rows for
numberOfItemsoranswerCountwhen more exist off-page (contradicts Schema.org and Google Q&A guidance). - Mismatch between UI and markup —
commentCountorreviewCounthigher or lower than the comment or review widgets users see. - Wrong vote model for Google Q&A — Publishing separate
downvoteCounton a Q&A page while also using net-onlyupvoteCountper Google’s aggregate rule (or the opposite: net math on non-Google consumers that expect gross upvotes). - RESO bathroom totals — Setting
numberOfBathroomsTotalto full-bath count only instead of the half-bath–weighted sum. - Fractions and strings — Sending
"3.5"or"ten"where the property expectsInteger. - Unknown job openings — Including
totalJobOpeningswhen the hiring team does not know the headcount (explicitly discouraged in Schema.org).
How to check this on your site
Section titled “How to check this on your site”-
For each integer property, open its definition on Schema.org (for example answerCount) and confirm the parent type and wording match your JSON-LD graph.
-
On question pages, compare
answerCount,commentCount, and vote fields to the live thread, using Q&A (QAPage) structured data rules for totals and netupvoteCount. -
For list and rating markup, verify paginated or truncated UI still uses full-list values documented for properties such as numberOfItems and ratingCount.
-
Cross-check accommodation integers against the RESO-style rules on numberOfBathroomsTotal and related bathroom properties if you publish real-estate structured data.
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about, and we will fix or explain it.