The runner crossed home before the third out. Does the run count?
Not if the third out is a force out. It also does not count when the batter-runner is retired before reaching first. On a non-force tag play, timing can matter, so a runner who touches home before the tag may score.
Crossing home first is not enough. You also have to know what kind of third out ended the inning.