From Tony Attwood, "The Complete Guide to Asperger's Syndrome" (Tony Attwood is a clinical psychologist and something of a world authority on AS).
"An evaluation of the children seen by Hans Asperger at his clinic in Austria from 1950 - 1980"........showed the most common interests of children with Asperger's syndrome to be animals and nature, followed by technical and scientific subjects, followed by public transport systems (not necessarily railways). However since Hans Asperger's time, other interests such as computer games, Japanese anime, science fiction films and TV series have also become very popular. Girls sometimes have interests more typical of girls in general and since girls were somewhat late to the AS party as far as diagnosis is concerned, the list of most common interests may change as clinicians become better at diagnosing girls.
Since my interests are the seabirds of the north Atlantic and the railways of the Scottish Highlands I fit Hans Asperger's original research quite nicely but things have obviously changed a bit since then. (Incidentally re the brief discussion above, I love gulls. They are such beautiful and interesting birds, a view which makes me somewhat unpopular with many people).
Based on my own, admittedly unscientific, observations of people I have spoken to in real life and on the internet, I suspect that railways are more interesting to people on the spectrum compared to the population in general; but the majority of people on the spectrum are not interested in railways and the majority of people who are interested in railways are not on the spectrum.