Write SQL query to solve given problem: How many students have the highest intelligence among those taking a bachelor's degree?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT COUNT(student_id) FROM student WHERE type = 'UG' AND intelligence = ( SELECT MAX(intelligence) FROM student )