The "1" class appeared in 1855, the Z12 class in 1877. Here are the intermediate classes.
Class Built
1 1855
5 1856 later renamed Class A (1st)
6 1857
8 1859
9 1858
10 1870 later renamed Class E
13 1863
14 1865
17 1865 later renamed Class E
20N 1872
23 1865 later renamed Class G
29 1864 later renamed Class S (1st)
36 1870
48 (1st) 1872
48 (2nd) 1874 later renamed Class I
60 1874 later renamed Class O
66 1874
67 1875
79 1877 later renamed Class C
93 1877 later renamed Class A (2nd)
105 1877 later renamed Class S (2nd)
As you are probably aware, the numbering/naming of locomotive classes in NSW up to 1924 was haphazard, even random, with some different types of locos sharing the same class ID. The renaming to a system using letters that occurred in 1889 did not really help matters. The 1924 classification system, that started the currently used method of 2 or 3 digit class numbers, retained the "Z" classification for those older locos left over from previous systems.
Source: Alex Grunbach. A Compendium of New South Wales Steam Locomotives. ARHS NSW
Peter Ware