Added an attribute count to the device struct.