What do all the numbers mean in a pubmed shorthand citation?
There are two parts to the citation that you gave.  The first part is an abbreviated citation:


  Ann N Y Acad Sci. 2008;1129:323-9


"Ann N Y Acad Sci." is an abbreviation for "Annals of the New York Academy of Sciences" which is a journal published by the New York Academy of Sciences.  2008 is the year of publication, 1129 is the volume number and 323-(32)9 are the pages of the volume containing this particular paper.

The second part


  doi: 10.1196/annals.1417.017


is a "Digital Object Identifier", which is a standardized unique number for the publisher's online version of the paper.  The DOI isn't supposed to have any particular meaning other than as a key that can be used to lookup a particular paper.  In this case the publisher has chosen to include "annals" (short hand for the journal title) as part of the DOI, but that's not really required.  

The DOI system is maintained by an organization called CrossRef.  Publishers pay a fee for membership in the organization and are given a part of the DOI name space in which they can assign identifiers.  

CrossRef maintains a central database which keys off of these DOI numbers.  The central database contains the metadata (journal title, article title, authors, etc.) for this paper, along with a link to the publisher's copy of the paper.  If this metadata changes for some reason (e.g. an authors name was misspelled) the metadata can be updated in the database.  More importantly, if the publisher rearranges its website at a later date and moves the online copy of the paper to a different URL, they can update this link while leaving the DOI unchanged.  

You can go to 

http://crossref.org/

and enter a DOI to find the metadata about the corresponding article.  

You can also use a link like

http://dx.doi.org/10.1196/annals.1417.017

to refer to the article.  When a web browser accesses this link, it will be redirected to the current location of the paper based on the record in the crossref database.