Some people say both mathematics and philosophy are not science, because they deal with purely abstract entities. Still some others say both mathematics and philosophy are science, because the purely abstract entities they deal with are from objective world.
From the ontology and form: Is mathematics a science? Is philosophy a science? Is philosophy of mathematics a science? What is science?