PHB, page 216, Identify spell
"The spell determines the single most basic function of each magic item, including how to activate that function (if appropriate), and how many charges are left (if any). For example, a +2 vorpal sword, a +2 dancing sword, and a +2 sword would all register as “+2 to attack and damage rolls.”
emphasis added.