I can't find anything about this online, and I'm beginning to suspect it's a hard problem. I know that counting the number of circuits is #P-complete, but I don't need the number of circuits; I need the number of trails. My current "solution" is to simply walk the graph, find every path, and count them.
Important notes:
- The graph is directed.
- The graph is connected.
- The graph has at most two vertices with different in- and out-degrees.
- I'm looking for trails, including but not limited to circuits.
Any information on this, including upper limits, computational complexity, algorithms, etc., would be helpful.
I'm not sure why I didn't realize this before, but perhaps this will help someone with my same misunderstanding: being able to count Eulerian trails for arbitrary directed, connected graphs would imply being able to count Eulerian circuits for arbitrary directed, connected graphs, which would imply $P=NP$, societies would crumble, and anarchy would reign. (Maybe I'm being a bit hyperbolic but you get the idea.)