It depends on the bike. Motocross bikes like CR, KX, RM, YZ bikes will require a new top end more often than offroad bikes like the KDX, EXC, XC, XC-W, MXC, EC, etc lines of bikes. If you don't ride aggressively, you should have no problem getting more than a season out of a top end, depending on how often you ride. Also, smaller displacement bikes (85, 125) tend to need rebuilding more often that larger displacement bikes (250, 300, 500). I know my GasGas will get atleast two seasons, probably more out of a piston and rings. A guy I know went over 4 years riding 42 weekends a year (and he does race) on a top end in his GasGas EC300. When he tore it down it turned out that the piston, rings and cylinder were all still in spec. This engine had over 1000 hours on it.
What bike do you have specifically in mind?