What about having buildings that are not connected? The card shows that 1 building gives you 2 coins. Building 4 unconnected buildings would give you 2x4= 8 coins?
Would you also get 8 coins with 2 rows of 2 buildings each? As they are all of the same length, this would not contradict the "longest row" rule.
You use the longest chain of structures. If you had 4 unconnected buildings, you would score 1 time for 1 building.