It always works fine for me there:
sage: g = graphs.RandomGNP(37,1/365)sage: len(g.edges(labels=False))3
I just pasted your code in.
William