Hold 1 ear of corn upright, base down, in a shallow bowl. Using a sharp knife, cut straight down between the kernels and the cob, freeing the kernels and rotating the ear a quarter turn after each stroke. Repeat with the remaining ears. Transfer the corn kernels to a bowl. Using the fine rasps on a grater, grate the onion into the bowl. Sprinkle the corn and onion with the flour, baking powder, salt, and pepper and stir to mix. Add the egg and cheese and mix well.
Pour olive oil to a depth of a scant ¼ inch (6 mm) in a large frying pan and heat over medium-high heat. When the oil is hot, drop the corn mixture by heaping teaspoons into the hot oil, spacing them about 1 inch (2.5 cm) apart. Press down gently with the back of a wooden spoon and fry until golden brown on the first side, about 2 minutes. Turn the fritters and fry until golden brown on the second side, about 1 minute longer. Using a slotted spatula, transfer to a paper towel–lined platter to drain. Repeat with the remaining corn mixture, adding more oil and reducing the heat if necessary.
Transfer to a platter, sprinkle with salt, and serve hot or warm.