In a Cycles node-based material, is there any way to determine (via an Attribute, properties of the Geometry node, Texture Coordinate node, or any other means) how many vertices make up the current face, ie, whether it is a Tri or a Quad (or Ngon).
Before Blender renders, all models are triangulated and normals are calculated. There is no way to detect whether the face was an ngon or a tri. But you could apply different material indicies for the ngons than for tris. Then you could just get the info from the object info node. You could easily do that by selecting a tri for example and hitting Shift+G (make sure you are in face select mode). A menu pops up and you choose Polygon Sides. That assign the same Material as before but in a new Materials Slot.