Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7161)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7162)
@@ -166,4 +166,13 @@
             return Arrays.asList(args);
         }
+        
+        /**
+         * Returns the number of elements in a list.
+         * @param lst the list
+         * @return length of the list
+         */
+        public static Integer count(List<?> lst) {
+            return lst.size();
+        }
 
         /**
@@ -717,4 +726,7 @@
      * Separate implementation to support overloading for different
      * argument types.
+     * 
+     * The use for calculating the length of a list is deprecated, use
+     * {@link Functions#count(java.util.List)} instead (see #10061).
      */
     public static class LengthFunction implements Expression {
