Numbers from 1 to 50: Cross out multiples of 3: 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48 (16 numbers) Remaining: 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50 (34 numbers)Cross out numbers with exactly three factors: Numbers with exactly three factors are squares of prime numbers. Primes less than 50≈7.07 are 2, 3, 5, 7. Numbers to be removed from the remaining list: 4, 25, 49 (3 numbers). Final count: 34−3=31