The votes are being counted in what's likely to be a close federal election in New Zealand.