Snaq,
No, they would not have counted the basket.
It is illegal to INTENTIONALLY score a goal in the other teams basket.
A few years ago, Shandon Anderson (rookie season)
made a half-hearted attempt to score in the other teams basket at the end of the game. Hue Hollins gave him a tongue lashing!
Basically this is the NBA's way to try and prevent point-shaving.