All and none of the above. It depends on the winery.
Officially the AP number refers to the wine as it was submitted for its official analysis/tasting review. A producer may submit a sample from a single fuder (cask) or tank, or a sample that comes from a final blend of several fuders/tanks. So (to give an example) when J. J. Prum releases a 2005 Wehlener Sonnenuhr Auslese that has an AP number finishing with 23-06, it means that was the 23rd wine they submitted for approval in 2006. Whether that was a single cask of Riesling or a blend of several nobody will know since Prum does not allow folks into the cellars. In some other cases, producers like Schmitt-Wagner, Merkelbach and Muller-Catoir submitted samples from single casks for AP numbers, and sometimes (e.g. Catoir in the past) that cask number (not so much a cask but rather a sequential number of hte wines made by the estate, but cask is close enough) also showed up on the label. Thus in 2001 we had 2 Catoir Haardter Burgergarten Riesling Spatlese in the USA, one with 2133 in the upper right hand corner of the label and the other with 2134 - each having it’s own distinct AP number (I think 2134 was AP#9, but can’t be certain without a bottle in front of me - or a frontal lobotomy).
Stars? My God, it’s full of stars.
Just to be entirely anal about it, that '01 Catoir 2134 was a special bottling exclusively from the Breumel.
Thanks for fielding the query.
What is a Breumel?
Sub-parcel of the Haardter Burgergarten.