Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java	(revision 6646)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java	(revision 6647)
@@ -31,5 +31,5 @@
 
     static int getLanesCount(String value) {
-        return value.isEmpty() ? 0 : value.split("\\|").length;
+        return value.isEmpty() ? 0 : value.replaceAll("[^|]", "").length() + 1;
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LanesTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LanesTest.groovy	(revision 6646)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LanesTest.groovy	(revision 6647)
@@ -18,4 +18,5 @@
         assert lanes.getLanesCount("left|right") == 2
         assert lanes.getLanesCount("yes|no|yes") == 3
+        assert lanes.getLanesCount("yes||") == 3
     }
 
@@ -54,3 +55,8 @@
         assert lanes.errors.get(0).getMessage() == "Number of lanes:forward+lanes:backward greater than lanes"
     }
+
+    void test8() {
+        lanes.check(TestUtils.createPrimitive("way destination:country:lanes=X|Y;Z|none destination:ref:lanes=xyz|| destination:sign:lanes=none|airport|none"))
+        assert lanes.errors.isEmpty()
+    }
 }
